import { Field, Int, ObjectType } from "@nestjs/graphql";
import { OrderOnGoods } from "@prisma/client";
import { GoodsEntity } from "./goods.entity";
import { OrderEntity } from "./order.entity";



@ObjectType()
export class OrderOnGoodsEntity implements OrderOnGoods {
    @Field(() => Int)
    count: number;

    @Field(() => Int)
    goodsId: number;

    @Field(() => GoodsEntity, { nullable: true })
    goods?: GoodsEntity

    @Field(() => Int)
    orderId: number;

    @Field(() => OrderEntity, { nullable: true })
    order?: OrderEntity
}